package cn.com.bluemoon.daps.standard.entity;

import cn.com.bluemoon.daps.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 编码规则表，如：指标编码规则，自动生成，规则：
 * ZB_MM_NNNNNN
 * ZB：“指标”的标识；
 * MM：代码所属于主题的代码；
 * NNNNNN：6位数字序列号，从000001开始排序；
 * 举例：ZB_ZF_000001。
 * </p>
 *
 * @author admin
 * @since 2020-08-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors
@ApiModel(value = "DapSystemSequenceGenerate", description = "编码规则表，如：指标编码规则，自动生成，规则： ")
public class DapSystemSequenceGenerate extends BaseModel<DapSystemSequenceGenerate> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编码类型：ZB 对应指标 ..")
    private String type;

    @ApiModelProperty(value = "代码所属于主题的代码： ZF")
    private String topicCode;

    @ApiModelProperty(value = "序列号")
    private Integer mySerial;

    @ApiModelProperty(value = "序列号长度")
    private Integer mySerialLength;

    @ApiModelProperty(value = "当前最新序列号")
    private String currentSerial;

    public DapSystemSequenceGenerate() {
    }

    public DapSystemSequenceGenerate(String type, String topicCode) {
        this.type = type;
        this.topicCode = topicCode;
    }

}
